
const TokenKey = 'Admin-Token'

const ExpiresInKey = 'Admin-Expires-In'

const UserKey = 'Admin-User'

const InviteeKey = "inviteeId"

export function getToken () {
  return uni.getStorageSync(TokenKey)
}

export function setToken (token) {
	return uni.setStorageSync(TokenKey,token)
}

export function removeToken () {
  return uni.removeStorageSync(TokenKey)
}

export function getData () {
  return uni.getStorageSync(UserKey) ? JSON.parse(uni.getStorageSync(UserKey)) : uni.getStorageSync(UserKey)
}

export function setData (data) {
	return uni.setStorageSync(UserKey, JSON.stringify(data))
}

export function removeData () {
  return uni.removeStorageSync(UserKey)
}

export function setIsMobileCookie (val) {
  return uni.setStorageSync(IsMobileCookie, val)
}

export function getIsMobileCookie (val) {

  return uni.getStorageSync("IsMobileCookie")
}

export function getExpiresIn() {
  return uni.getStorageSync(ExpiresInKey) || -1
}

export function setExpiresIn(time) {
  return uni.setStorageSync(ExpiresInKey, time)
}

export function removeExpiresIn() {
  return uni.removeStorageSync(ExpiresInKey)
}


export function setInvitee (inviteeId) {
	return uni.setStorageSync(InviteeKey,inviteeId)
}

export function getInvitee () {
  return uni.getStorageSync(InviteeKey)
}

export function removeInvitee() {
return uni.removeStorageSync(InviteeKey)
}